-
Notifications
You must be signed in to change notification settings - Fork 873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix JDK http client propagation of non-sampled traces #3736
Fix JDK http client propagation of non-sampled traces #3736
Conversation
// sleep to ensure no spans are emitted | ||
Thread.sleep(1000); | ||
|
||
assertThat(testing.traces()).isEmpty(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this verify that the proper headers are being sent? Would you expect the server to generate a trace if it wasn't?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ya 👍
if (Java8BytecodeBridge.currentSpan().isRecording()) { | ||
headers = tracer().inject(headers); | ||
} | ||
headers = tracer().inject(headers); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like I just happened to pick an unlucky client. ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or a lucky one, to find this bug 💯
closing and re-opening to re-trigger CLA check |
/easycla |
assertThat(responseCode).isEqualTo(200); | ||
|
||
// sleep to ensure no spans are emitted | ||
Thread.sleep(1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1s seems too slow how about around 200? I think we get traces back in just a few ms most times.
And adds missing test coverage to
HttpClientTest